<?php
$_id=$data[dep_id];
$_name= $data[dep_name];
require_once './connect.php';
//处理数据
/*switch($data[dep_id]){
    case '产科': $_dep='01'; break;
    case '创伤骨科': $_dep='02'; break;
    case '口鼻候科': $_dep='03'; break;
    case '儿科': $_dep='04'; break;
    case '妇科': $_dep='05'; break;
    default:$_dep='00'; break;
}*/
//查询语句
$sql = "INSERT INTO _department(dep_id,dep_name)VALUES ('$_id','$_name')";
if ($conn->query($sql) === TRUE) {
    $response = '成功';
} else {
    $response = '失败';
}
/*echo $_name;
echo $data[dep_id];
echo  $_dep;*/
echo 'test'.$response;
$conn->close();
?>